/**
 * Copyright (C) 2001-2017 wxyz <hyhjwzx@126.com>
 * <p>
 * This program can be distributed under the terms of the GNU GPL Version 2.
 * See the file LICENSE.
 */
package ren.wxyz.webtools.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 时间相关功能
 *
 * @auther wxyz 2017-08-25_17:46
 * @since 1.0
 */
@RestController
public class TimeController {

    @RequestMapping("/now")
    public String now() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
    }
}
